[196-Disable] DB Migration

Glenn 'devalias' Grant 10 anos atrás
pai
commit
c73a21aab3
2 arquivos alterados com 20 adições e 22 exclusões
  1. 5 0
      db/migrate/20140403043556_add_disabled_to_agent.rb
  2. 15 22
      db/schema.rb

+ 5 - 0
db/migrate/20140403043556_add_disabled_to_agent.rb

@@ -0,0 +1,5 @@
1
+class AddDisabledToAgent < ActiveRecord::Migration
2
+  def change
3
+    add_column :agents, :disabled, :boolean, :default => false, :null => false
4
+  end
5
+end

+ 15 - 22
db/schema.rb

@@ -11,21 +11,21 @@
11 11
 #
12 12
 # It's strongly recommended to check this file into your version control system.
13 13
 
14
-ActiveRecord::Schema.define(:version => 20140216201250) do
14
+ActiveRecord::Schema.define(:version => 20140403043556) do
15 15
 
16 16
   create_table "agent_logs", :force => true do |t|
17
-    t.integer  "agent_id",                                             :null => false
18
-    t.text     "message",           :limit => 16777215,                :null => false
19
-    t.integer  "level",                                 :default => 3, :null => false
17
+    t.integer  "agent_id",                         :null => false
18
+    t.text     "message",                          :null => false
19
+    t.integer  "level",             :default => 3, :null => false
20 20
     t.integer  "inbound_event_id"
21 21
     t.integer  "outbound_event_id"
22
-    t.datetime "created_at",                                           :null => false
23
-    t.datetime "updated_at",                                           :null => false
22
+    t.datetime "created_at",                       :null => false
23
+    t.datetime "updated_at",                       :null => false
24 24
   end
25 25
 
26 26
   create_table "agents", :force => true do |t|
27 27
     t.integer  "user_id"
28
-    t.text     "options",               :limit => 16777215
28
+    t.text     "options"
29 29
     t.string   "type"
30 30
     t.string   "name"
31 31
     t.string   "schedule"
@@ -37,29 +37,22 @@ ActiveRecord::Schema.define(:version => 20140216201250) do
37 37
     t.datetime "updated_at",                                                     :null => false
38 38
     t.text     "memory",                :limit => 2147483647
39 39
     t.datetime "last_webhook_at"
40
+    t.integer  "keep_events_for",                             :default => 0,     :null => false
40 41
     t.datetime "last_event_at"
41 42
     t.datetime "last_error_log_at"
42
-    t.integer  "keep_events_for",                             :default => 0,     :null => false
43 43
     t.boolean  "propagate_immediately",                       :default => false, :null => false
44
+    t.boolean  "disabled",                                    :default => false, :null => false
44 45
   end
45 46
 
46 47
   add_index "agents", ["schedule"], :name => "index_agents_on_schedule"
47 48
   add_index "agents", ["type"], :name => "index_agents_on_type"
48 49
   add_index "agents", ["user_id", "created_at"], :name => "index_agents_on_user_id_and_created_at"
49 50
 
50
-  create_table "contacts", :force => true do |t|
51
-    t.text     "message"
52
-    t.string   "name"
53
-    t.string   "email"
54
-    t.datetime "created_at", :null => false
55
-    t.datetime "updated_at", :null => false
56
-  end
57
-
58 51
   create_table "delayed_jobs", :force => true do |t|
59 52
     t.integer  "priority",                       :default => 0
60 53
     t.integer  "attempts",                       :default => 0
61 54
     t.text     "handler",    :limit => 16777215
62
-    t.text     "last_error", :limit => 16777215
55
+    t.text     "last_error"
63 56
     t.datetime "run_at"
64 57
     t.datetime "locked_at"
65 58
     t.datetime "failed_at"
@@ -74,11 +67,11 @@ ActiveRecord::Schema.define(:version => 20140216201250) do
74 67
   create_table "events", :force => true do |t|
75 68
     t.integer  "user_id"
76 69
     t.integer  "agent_id"
77
-    t.decimal  "lat",                              :precision => 15, :scale => 10
78
-    t.decimal  "lng",                              :precision => 15, :scale => 10
79
-    t.text     "payload",    :limit => 2147483647
80
-    t.datetime "created_at",                                                       :null => false
81
-    t.datetime "updated_at",                                                       :null => false
70
+    t.decimal  "lat",                            :precision => 15, :scale => 10
71
+    t.decimal  "lng",                            :precision => 15, :scale => 10
72
+    t.text     "payload",    :limit => 16777215
73
+    t.datetime "created_at",                                                     :null => false
74
+    t.datetime "updated_at",                                                     :null => false
82 75
     t.datetime "expires_at"
83 76
   end
84 77